/*
 * Copyright (c) 2017. All  rights reserved.
 * 项目名：microservice-base
 * 文件名：Menu.java
 * Date  ：17-11-20 下午9:59
 * Author：abin
 *
 */

package com.microservice.base.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microservice.base.common.enums.OperateType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class Menu implements Serializable {

    private static final long serialVersionUID = 8952513617025317472L;

    @JsonProperty("id")
    private String menuId;
    private String schoolCode;
    @JsonProperty("text")
    private String name;
    private String projectName;
    private String category;
    private String menuCode;
    @JsonIgnore
    private String parentId;
    private String layer;
    private String icon;
    @JsonInclude(Include.NON_EMPTY)
    private String url;
    private String isShow;
    private String button;
    private String status;
    private String remarks;
    @JsonIgnore
    private User createUser;
    @JsonIgnore
    private Date createTime;
    @JsonIgnore
    private User updateUser;
    @JsonIgnore
    private Date updateTime;
    @JsonProperty("children")
    private List<Menu> menus;
    @JsonProperty("auth")
    @JsonInclude(Include.NON_EMPTY)
    private List<Role> roles;
    @JsonInclude(Include.NON_EMPTY)
    private OperateType type;
    @JsonInclude(Include.NON_EMPTY)
    private Integer rank;
    @JsonIgnore
    private Boolean permission;
    @JsonInclude(Include.NON_EMPTY)
    private MenuState state;
    @JsonInclude(Include.NON_EMPTY)
    private String orderNo;
    @JsonIgnore
    private String originalOrderNo;
    @JsonIgnore
    private List<String> ids;
}